package com.castle.fortress.admin.cms.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
/**
 * cms模型字段配置表 实体类
 *
 * @author castle
 * @since 2022-03-03
 */
@Data
@ApiModel(value = "cmsColConfig对象", description = "cms模型字段配置表")
public class CmsColConfigDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "主键")
	@JsonProperty("id")
	private Long id;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "模型id")
	@JsonProperty("modelId")
	private Long modelId;
	@ApiModelProperty(value = "字段标题")
	@JsonProperty("colTitle")
	private String colTitle;
	@ApiModelProperty(value = "字段名")
	@JsonProperty("colName")
	private String colName;
	@ApiModelProperty(value = "标签引用名")
	@JsonProperty("propName")
	private String propName;
	@ApiModelProperty(value = "字段类型")
	@JsonProperty("colType")
	private String colType;
	@ApiModelProperty(value = "属性类型")
	@JsonProperty("propType")
	private String propType;
	@ApiModelProperty(value = "是否必填")
	@JsonProperty("isFormRequire")
	private Integer isFormRequire;
	@ApiModelProperty(value = "校验类型")
	@JsonProperty("validateType")
	private Integer validateType;
	@ApiModelProperty(value = "表单类型")
	@JsonProperty("formType")
	private Integer formType;
	@ApiModelProperty(value = "数据集")
	@JsonProperty("listdataConfig")
	private String listdataConfig;
	@ApiModelProperty(value = "数量限制")
	@JsonProperty("limitSize")
	private Integer limitSize;
	@ApiModelProperty(value = "是否预设")
	@JsonProperty("isSys")
	private Boolean isSys;

	public CmsColConfigDto() {
	}

	public CmsColConfigDto(Long id, String colTitle, String colName, String propName, String colType, String propType, Integer isFormRequire, Integer validateType, Integer formType, String listdataConfig, Integer limitSize, Boolean isSys) {
		this.id = id;
		this.colTitle = colTitle;
		this.colName = colName;
		this.propName = propName;
		this.colType = colType;
		this.propType = propType;
		this.isFormRequire = isFormRequire;
		this.validateType = validateType;
		this.formType = formType;
		this.listdataConfig = listdataConfig;
		this.limitSize = limitSize;
		this.isSys = isSys;
	}
}
